<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>修改事项 - 个人备忘录</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    body {
      background-color: #f5f7fa;
      color: #333;
      line-height: 1.6;
      padding: 20px;
    }

    .container {
      max-width: 800px;
      margin: 0 auto;
    }

    header {
      text-align: center;
      padding: 20px;
      background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
      color: white;
      border-radius: 10px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    h1 {
      font-size: 2.5rem;
      margin-bottom: 10px;
    }

    .subtitle {
      font-size: 1.1rem;
      opacity: 0.9;
    }

    .edit-app {
      background: white;
      border-radius: 10px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      padding: 25px;
    }

    .form-group {
      margin-bottom: 20px;
    }

    label {
      display: block;
      margin-bottom: 8px;
      font-weight: 600;
      color: #2c3e50;
    }

    input,
    textarea {
      width: 100%;
      padding: 12px 15px;
      border: 1px solid #ddd;
      border-radius: 5px;
      font-size: 16px;
      transition: border 0.3s;
    }

    input:focus,
    textarea:focus {
      border-color: #3498db;
      outline: none;
      box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    }

    textarea {
      min-height: 150px;
      resize: vertical;
    }

    .btn-group {
      display: flex;
      gap: 15px;
      margin-top: 30px;
    }

    .btn {
      padding: 12px 20px;
      border: none;
      border-radius: 5px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      flex: 1;
    }

    .btn-primary {
      background-color: #3498db;
      color: white;
    }

    .btn-primary:hover {
      background-color: #2980b9;
    }

    .btn-secondary {
      background-color: #95a5a6;
      color: white;
    }

    .btn-secondary:hover {
      background-color: #7f8c8d;
    }

    .back-link {
      display: inline-block;
      margin-bottom: 20px;
      color: #3498db;
      text-decoration: none;
      font-weight: 600;
      transition: color 0.3s;
    }

    .back-link:hover {
      color: #2980b9;
    }

    @media (max-width: 600px) {
      .btn-group {
        flex-direction: column;
      }
    }
  </style>
</head>

<body>
  <div class="container">
    <a href="/" class="back-link">← 返回备忘录</a>

    <header>
      <h1>修改事项</h1>
      <p class="subtitle">编辑您的备忘录事项</p>
    </header>

    <div class="edit-app">
      <form method="post" action="/change/<%=id%>">
        <div class="form-group">
          <label for="memoTitle">事项标题</label>
          <input name="title" type="text" id="memoTitle" value="<%= title%>">
        </div>

        <div class="form-group">
          <label for="memoContent">事项详情</label>
          <textarea name="detail" id="memoContent"><%= detail%></textarea>
        </div>

        <div class="btn-group">
          <button type="submit" class="btn btn-primary">保存更改</button>
        </div>
      </form>
    </div>
  </div>
</body>

</html>